/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef __C_TEX_LINE_SCENE_NODE_H_INCLUDED__
#define __C_TEX_LINE_SCENE_NODE_H_INCLUDED__

#include "CMeshSceneNode.h"

struct irr::video::S3DVertex;


// Scene node which is a textured 3d line
class CTexLineSceneNode : public irr::scene::CMeshSceneNode
{
public:

	CTexLineSceneNode(irr::u32 maxSegments, irr::s32 id = -1);
	virtual ~CTexLineSceneNode();

	//virtual void render(void* renderData = 0);
	virtual void OnRegisterSceneNode();

	void setOrientation(irr::core::vector3df orientation) { Orientation = orientation; Orientation.normalize(); }
	void setLineWidth(irr::f32 lineWidth) { LineWidth = lineWidth; }
	void setSegmentStep(irr::f32 segmStep) { SegmStep = segmStep; }
	void setTextureBorders(irr::f32 borderUp, irr::f32 borderDown);
	void setLineSegment(irr::core::vector3df startPoint, irr::core::vector3df endPoint);

private:
	irr::u16 MaxSegments, VerticesCount;
	irr::s16 AlteredVertMap;
	irr::core::array<irr::video::S3DVertex>*	Vertices;
	irr::core::array<irr::u16>*					Indices;
	irr::core::vector3df						Orientation;
	irr::f32									LineWidth;
	irr::f32									SegmStep;
	irr::f32									TexBorderUp, TexBorderDown;
};

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#endif // __C_TEX_LINE_SCENE_NODE_H_INCLUDED__

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
